import request from '@/utils/request'
export default {
    //1 添加课程信息
    addCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/course/saveCourseInfo',
            method: 'post',
            data: courseInfo
        })
    },
    //2 查询所有讲师
    getListTeacher() {
        return request({
            url: '/eduservice/teacher/findAll',
            method: 'get'
        })
    },
    //根据课程id查询课程基本信息
    getCourseInfoId(id) {
        return request({
            url: '/eduservice/course/getCourseInfo/' + id,
            method: 'get'
        })
    },
    //修改课程信息
    updateCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/course/updateCourseInfo',
            method: 'post',
            data: courseInfo
        })
    },
    //显示发布信息
    getCoursePublishInfo(courseId) {
        return request({
            url: '/eduservice/course/getCoursePublishInfo/' + courseId,
            method: 'get',
        })
    },
    
    //修改发布状态
    updateStatus(courseId) {
        return request({
            url: '/eduservice/course/updateStatus/' + courseId,
            method: 'get',
        })
    },
    //获取所有课程信息
    getAllCourseInfo(courseId) {
        return request({
            url: '/eduservice/course/getAllCourseInfo/' + courseId,
            method: 'get',
        })
    },
    getCourseListPage(current,size,courseQuery){
        return request({
            url: '/eduservice/course/getCourseInfoByCondition/' + current+'/'+size,
            method: 'post',
            data: courseQuery
        })
    },
    deleteCourseByID(courseId) {
        return request({
            url: '/eduservice/course/deleteCourseByID/' + courseId,
            method: 'get',

        })
    },

}
